The best way to conduct an attack is concentration of force against a small number of defenders. Use light cavalry and light infantry to draw fire from stationary defenders, and then move in your heavy forces and destroy the line of enemies one by one. Use your artillery to weaken the better enemy defenders before your best pieces close with them.
On defense, even though you benefit from entrenchments, you must fight actively. Try to hit attacking artillery with light cavalry and reserve your artillery to hit the enemy grenadiers and heavy cavalry when they get close enough. Be willing to retreat and save your men for a counter-attack unless you are defending your capital.